import request from '@/utils/request'

export function findAllEmployee(data,params) {
  return request({
    url: '/employee/findAllEmployee',
    method: 'post',
    data,
    params
  })
}

export function findEmpParentDept(params) {
  return request({
    url: '/employee/findEmpParentDept',
    method: 'get',
    params
  })
}

export function findEmpChildrenDept(params) {
  return request({
    url: '/employee/findEmpChildrenDept',
    method: 'get',
    params
  })
}

export function addEmployee(data) {
  return request({
    url: '/employee/addEmployee',
    method: 'post',
    data
  })
}

export function updateEmployee(data) {
  return request({
    url: '/employee/updateEmployee',
    method: 'post',
    data
  })
}

export function findEmployee(params) {
  return request({
    url: '/employee/findEmployee',
    method: 'get',
    params
  })
}

export function exportEmp(data) {
  return request({
    url: '/employee/exportEmp',
    method: 'post',
    data
  })
}

export function deleteEmployee(data) {
  return request({
    url: '/employee/deleteEmployee',
    method: 'post',
    data
  })
}

export function uploadPhoto(data) {
  return request({
    url: '/employee/uploadPhoto',
    method: 'post',
    data
  })
}
